import React, {Component} from 'react'
import {connect} from 'react-redux'

import MyHeader from "../components/myheader"
import {changeLoginPwd} from "../redux/actions/userAction"
import {RES_OK_CODE,RES_BLOCKED_CODE} from "../redux/types/index" 

import { Button,InputItem } from 'antd-mobile'

export default class NameChange extends Component {
  constructor (props){
   super(props)
   this.state= {
     name: ""
   }
}
 componentDidMount(){
  this.autoFocusInst.focus();
 }

   render() {
   return <div className="changepw">
      <MyHeader {...this.props}>修改昵称</MyHeader>

      <div className="basepage">
          <div className="changepw-container">
            <InputItem type="text"
              ref={el => this.autoFocusInst = el}
                placeholder="昵称为1-10个字符，中英皆可"
                onChange={(name)=>{this.setState({name})}}
                value={this.state.name}
            >昵称：</InputItem>
            <div className="tip">
              <p>提示：设置之后不能修改</p>
            </div>
            <Button type="primary" onClick={()=>{}}>确定</Button>
            </div>
      </div>
   </div>
   }
}